package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 钻取分析结果表，存储下钻分析数据
 * @TableName drill_analysis_result
 */
@TableName(value ="drill_analysis_result")
@Data
public class DrillAnalysisResult {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 关联的监测结果ID
     */
    private Long monitorResultId;

    /**
     * 钻取维度(enterprise:企业,port:口岸等)
     */
    private String drillDimension;

    /**
     * 维度值
     */
    private String dimensionValue;

    /**
     * 进口金额
     */
    private BigDecimal importAmount;

    /**
     * 进口金额同比
     */
    private BigDecimal importAmountYoy;

    /**
     * 进口金额环比
     */
    private BigDecimal importAmountMom;

    /**
     * 出口金额
     */
    private BigDecimal exportAmount;

    /**
     * 出口金额同比
     */
    private BigDecimal exportAmountYoy;

    /**
     * 出口金额环比
     */
    private BigDecimal exportAmountMom;

    /**
     * 进出口总金额
     */
    private BigDecimal totalAmount;

    /**
     * 总金额同比
     */
    private BigDecimal totalAmountYoy;

    /**
     * 总金额环比
     */
    private BigDecimal totalAmountMom;

    /**
     * 
     */
    private Date createTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DrillAnalysisResult other = (DrillAnalysisResult) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMonitorResultId() == null ? other.getMonitorResultId() == null : this.getMonitorResultId().equals(other.getMonitorResultId()))
            && (this.getDrillDimension() == null ? other.getDrillDimension() == null : this.getDrillDimension().equals(other.getDrillDimension()))
            && (this.getDimensionValue() == null ? other.getDimensionValue() == null : this.getDimensionValue().equals(other.getDimensionValue()))
            && (this.getImportAmount() == null ? other.getImportAmount() == null : this.getImportAmount().equals(other.getImportAmount()))
            && (this.getImportAmountYoy() == null ? other.getImportAmountYoy() == null : this.getImportAmountYoy().equals(other.getImportAmountYoy()))
            && (this.getImportAmountMom() == null ? other.getImportAmountMom() == null : this.getImportAmountMom().equals(other.getImportAmountMom()))
            && (this.getExportAmount() == null ? other.getExportAmount() == null : this.getExportAmount().equals(other.getExportAmount()))
            && (this.getExportAmountYoy() == null ? other.getExportAmountYoy() == null : this.getExportAmountYoy().equals(other.getExportAmountYoy()))
            && (this.getExportAmountMom() == null ? other.getExportAmountMom() == null : this.getExportAmountMom().equals(other.getExportAmountMom()))
            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
            && (this.getTotalAmountYoy() == null ? other.getTotalAmountYoy() == null : this.getTotalAmountYoy().equals(other.getTotalAmountYoy()))
            && (this.getTotalAmountMom() == null ? other.getTotalAmountMom() == null : this.getTotalAmountMom().equals(other.getTotalAmountMom()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMonitorResultId() == null) ? 0 : getMonitorResultId().hashCode());
        result = prime * result + ((getDrillDimension() == null) ? 0 : getDrillDimension().hashCode());
        result = prime * result + ((getDimensionValue() == null) ? 0 : getDimensionValue().hashCode());
        result = prime * result + ((getImportAmount() == null) ? 0 : getImportAmount().hashCode());
        result = prime * result + ((getImportAmountYoy() == null) ? 0 : getImportAmountYoy().hashCode());
        result = prime * result + ((getImportAmountMom() == null) ? 0 : getImportAmountMom().hashCode());
        result = prime * result + ((getExportAmount() == null) ? 0 : getExportAmount().hashCode());
        result = prime * result + ((getExportAmountYoy() == null) ? 0 : getExportAmountYoy().hashCode());
        result = prime * result + ((getExportAmountMom() == null) ? 0 : getExportAmountMom().hashCode());
        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
        result = prime * result + ((getTotalAmountYoy() == null) ? 0 : getTotalAmountYoy().hashCode());
        result = prime * result + ((getTotalAmountMom() == null) ? 0 : getTotalAmountMom().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", monitorResultId=").append(monitorResultId);
        sb.append(", drillDimension=").append(drillDimension);
        sb.append(", dimensionValue=").append(dimensionValue);
        sb.append(", importAmount=").append(importAmount);
        sb.append(", importAmountYoy=").append(importAmountYoy);
        sb.append(", importAmountMom=").append(importAmountMom);
        sb.append(", exportAmount=").append(exportAmount);
        sb.append(", exportAmountYoy=").append(exportAmountYoy);
        sb.append(", exportAmountMom=").append(exportAmountMom);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", totalAmountYoy=").append(totalAmountYoy);
        sb.append(", totalAmountMom=").append(totalAmountMom);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }
}